<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-unix;$(NetCoreAppCurrent)</TargetFrameworks>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    <UseCompilerGeneratedDocXmlFile>false</UseCompilerGeneratedDocXmlFile>
  </PropertyGroup>

  <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
  <PropertyGroup>
    <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
    <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetPlatformIdentifier)' == ''">SR.DiagnosticsFileVersionInfo_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage> 
  </PropertyGroup>

  <ItemGroup Condition="'$(TargetPlatformIdentifier)' != ''">
    <Compile Include="System\Diagnostics\FileVersionInfo.cs" />
    <Compile Include="$(CommonPath)DisableRuntimeMarshalling.cs"
             Link="Common\DisableRuntimeMarshalling.cs" />
  </ItemGroup>
  <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
    <Compile Include="System\Diagnostics\FileVersionInfo.Windows.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"
             Link="Common\Interop\Windows\Interop.Libraries.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Version\Interop.FileVersionInfo.cs"
             Link="Common\Interop\Windows\Interop.FileVersionInfo.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Version\Interop.FileVersionInfoType.cs"
             Link="Common\Interop\Windows\Interop.FileVersionInfoType.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Version\Interop.GetFileVersionInfoEx.cs"
             Link="Common\Interop\Windows\Interop.GetFileVersionInfoEx.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Version\Interop.GetFileVersionInfoSizeEx.cs"
             Link="Common\Interop\Windows\Interop.GetFileVersionInfoSizeEx.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.VerLanguageName.cs"
             Link="Common\Interop\Windows\Interop.VerLanguageName.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Version\Interop.VerQueryValue.cs"
             Link="Common\Interop\Windows\Interop.VerQueryValue.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Version\Interop.VSFixedFileInfo.cs"
             Link="Common\Interop\Windows\Interop.VSFixedFileInfo.cs" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'unix'">
    <Compile Include="System\Diagnostics\FileVersionInfo.Unix.cs" />
    <Compile Include="$(CommonPath)Interop\Unix\Interop.Libraries.cs"
             Link="Common\Interop\Unix\Interop.Libraries.cs" />
    <Compile Include="$(CommonPath)Interop\Unix\Interop.Errors.cs"
             Link="Common\Interop\Unix\Interop.Errors.cs" />
    <Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.Stat.cs"
             Link="Common\Interop\Unix\Interop.Stat.cs" />
  </ItemGroup>

  <ItemGroup>
    <Reference Include="System.Memory" />
    <Reference Include="System.Runtime" />
    <Reference Include="System.Runtime.InteropServices" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'unix'">
    <Reference Include="System.Collections.Immutable" />
    <Reference Include="System.Reflection.Metadata" />
  </ItemGroup>

</Project>
